let name = 'sss';

function getname(){
    console.log("getname{name}",name);
    console.log("getname{this.name}",this.name);
}

let getname2=()=>{
   console.log("getname{name}",name);
    console.log("getname{this.name}",this.name);
    
}



window.name = 'zzl';
const data={
    name:'wxl'
}
getname();
getname2();

getname.call(data);
getname2.call(data);


let fn=()=>{
    console.log(12);
    
}

let add=n=>{
    return n+n;
}

let sum=n=>n*n;


// BigInt.addEventListener("click",function(){

// })

function Person(){
    this.age = 0;

    setInterval(function growUp(){
        this.age++;
    },1000);
    
}

var p = new Person();
console.log(p.age);


console.log('------------------------');

// function data({name,age='22'}){
//     console.log(name);
//     console.log(age);
    
// }

// data()

function sky(a,b,...args){
    console.log(a);
    console.log(b);
    console.log(args);
    
}

sky(1,2,3,4,5)


const obj1 = {
    q:'zzl'
}
const obj2 = {
    s:'wxl'
}
const loos = {...obj1,...obj2};
console.log(loos);
